function acuracia = calcAcuracia(estimatedClose, realClose)
total = size(estimatedClose, 1);
variacao_estimada = zeros(total,1);
variacao_real = zeros(total,1);
count = 0;

for i=2:total
    variacao_estimada(i) = (estimatedClose(i) - estimatedClose(i-1))/estimatedClose(i);
    variacao_real(i) = (realClose(i) - realClose(i-1))/realClose(i);
    if sign(variacao_estimada(i))==sign(variacao_real(i))
        count = count +1;
    end
end

acuracia = count/(total-1);

end
